using UnityEngine;

namespace IQIGame.Onigao.GamePlay
{
    [CreateAssetMenu(fileName = "JumpConfigAsset", menuName = "Create Scriptable Config/JumpConfigAsset")]
    public class JumpConfigAsset : ScriptableObject
    {
#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("起跳准备动画过度时间(s)")]
#endif
        [Tooltip("起跳准备动画过度时间(s)")]
        [SerializeField]
        public float jumpStartCrossTime = 0.2f;

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("起跳准备完成到跳到最高点的时间(s)")]
#endif
        [Tooltip("起跳准备完成到跳到最高点的时间(s)")]
        [SerializeField]
        public float jumpToHightTime = 0.6f;

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("最高点相对水平的偏移(m)")]
#endif
        [Tooltip("最高点相对水平的偏移(m)")]
        [SerializeField]
        public float jumpHeightOffset = 0.1f;

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("跳高到最高点的曲线")]
#endif
        [Tooltip("跳高到最高点的曲线")]
        [SerializeField]
        public AnimationCurve jumpToHeightCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f);

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("下落速度，计算下落时间用(m/s)")]
#endif
        [Tooltip("下落速度，计算下落时间用(m/s)")]
        [SerializeField]
        public float jumpFallSpeed = 3f;

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("下落过程中的曲线")]
#endif
        [Tooltip("下落过程中的曲线")]
        [SerializeField]
        public AnimationCurve jumpFallCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f);

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("下落进度到多少开始切跳跃结束动画")]
#endif
        [Tooltip("下落进度到多少开始切跳跃结束动画")]
        [Range(0, 1)]
        [SerializeField]
        public float switchEndProgress = 0.8f;

#if UNITY_EDITOR
        [Sirenix.OdinInspector.LabelText("结束动作的时间")]
#endif
        [Tooltip("结束动作的时间")]
        [SerializeField]
        public float jumpEndTime = 1f;
    }
}
